<?php

namespace App\Job;

use App\Utils\LoggerUtil;
use Hyperf\AsyncQueue\Job;

class AutoAdReturnQueueJob extends Job
{
    private mixed $params;

    public function __construct($params)
    {
        // 这里最好是普通数据，不要使用携带 IO 的对象，比如 PDO 对象
        $this->params = $params;
    }

    public function handle()
    {
        // TODO: Implement handle() method.
        $this->job($this->params);
    }

    private function job(mixed $origin)
    {
        LoggerUtil::write("auto_ad_return_queue", $origin);
    }
}